package com.atstudy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version v1.0
 * @description:
 * @author: admin
 * @date: 2023/2/17 13:57
 * @copyright: 博为峰
 */
@Controller
//@RestController
public class HelloController {

    @RequestMapping("/hello")
//    @ResponseBody
    String home() {
        return "Hello World!";
    }

    @RequestMapping("/ty")
//    @ResponseBody
    String ty(ModelMap map) {
        map.addAttribute("msg", "atstudy");
        return "tpl";
    }
}
